#! /bin/bash

echo "---------------------------------------------------------"
echo "Removing InaSAFE dependencies                      "
echo
echo "This will completely remove Qgis, GDAL, geos etc         "
echo
echo "THIS IS DANGEROUS AND COULD AFFECT YOUR ENTIRE SYSTEM    "

read -p "Do you wish to remove all InaSAFE dependencies [Y/N](N) ?" answer
case $answer in
    y | Y | yes | YES | Yes) answer="y";;
    * ) echo "OK - nothing done"; exit 0;
esac

read -p "ARE YOU SURE [Y/N](N) ?" answer
case $answer in
    y | Y | yes | YES | Yes) answer="y";;
    * ) echo "OK - nothing done"; exit 0;
esac

sudo apt-get update
sudo apt-get purge gdal-bin libgeos* libgdal* qgis*
sudo apt-get autoremove
